-
Notifications
You must be signed in to change notification settings - Fork 106
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Added session relaunch feature #2529
Conversation
ab6b4ac
to
701090f
Compare
There is a demo of the look and feel in the main issue: |
@@ -50,6 +50,7 @@ def boolean_configs | |||
:disable_bc_shell => false, | |||
:cancel_session_enabled => false, | |||
:hide_app_version => false, | |||
:relaunch_session_enabled => false, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think we want the config. Let's just let folks do it, I can't see why folks wouldn't want it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixed
apps/dashboard/config/locales/en.yml
Outdated
@@ -108,6 +108,8 @@ en: | |||
batch_connect_sessions_delete_title: "Delete" | |||
batch_connect_sessions_cancel_confirm: "Are you sure?" | |||
batch_connect_sessions_cancel_title: "Cancel" | |||
batch_connect_sessions_relaunch_confirm: "Are you sure?" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Surely we can reuse an Are you sure?
from somewhere else and/or make a generic one.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I forgot to remove this item. This was from the initial prototype.
The current implementation stars the session without prompting the user to confirm and shows the full page spinner.
Do you prefer the the button to show the Are you sure?
confirmation message instead of the full page spinner?
Here is the current demo:
#2522 (comment)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Got it, that makes sense. No, they should just boot it up. I think we only need to confirm when something is destructive.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixed
class: %w[btn px-1 py-0 btn-outline-dark relaunch], | ||
form_class: %w[d-inline relaunch], | ||
title: title, | ||
data: { toggle: "tooltip", placement: "left" }, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
data: { toggle: "tooltip", placement: "left" }, | |
data: { toggle: "tooltip", placement: "left", selector: true }, |
For whatever reason, we need to add this flag here because jQuery/bootstrap tooltip does something funny with the title and it throws off screen readers.
You can see in the html title
is empty, replaced by data-original-title
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Well one second, that actually breaks the hover-over tooltip.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I noticed that while testing, the Delete tooltip was broken.
Reading about, the selector
is needed when dynamic HTML is used and it should be a String with the locator of the tooltips elements. But I could not make it work locally.
In our case, we would need the selector for the card updates done with AJAX.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I noticed that while testing, the Delete tooltip was broken.
delete tooltip still works for me. Let's see if we can't get aria-labeledby='data-original-title'
to work.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This'll work for now, I'll create a follow up ticket to track tooltip buttons because I'd really like to use the title, but IDK if bs tooltips is going to let us.
'aria-label': title,
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No, let's keep the tooltip because that does tell folks what this button does. I think just adding 'aria-label': title,
to that hash will give us both the tooltip for sighted users and the accessibility for screen readers.
# ...
title: title,
'aria-label': title,
data: { toggle: "tooltip", placement: "left" },
params: params
) do
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
and we can fix the cancel/delete buttons in the same way.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ok
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixed
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This works for me, I just won't be able to merge until node fixes there certificates.
Added session relaunch button to session panel.
This will start a new interactive session based on the user context data available in a previously completed session.
Added as a experimental feature behind a feature toggle:
relaunch_session_enabled
Implements #2522
┆Issue is synchronized with this Asana task by Unito